<?php
class Search_Controller	{
	/*search for friend*/
	
	function search($targetId)	{
		require('../../host_config.php');
		require_once('../../Model/MySQL.php');
		$mysql=new MYSQL();
		$link = $mysql->connect($mysql_host, $mysql_user, $mysql_password, $mysql_db);
		$target=mysql_real_escape_string($targetId);
		$sql="SELECT * from user where (account='$targetId' OR name='$targetId') AND active_flag='1'";
		
		//return $mysql->query_row($sql, $link);
		
		return mysql_query($sql, $link);
	}
	
}
?>